#include <stdio.h>
int main(void)
{
    int m, n;
    printf("Enter two integers: ");
    scanf("%d %d", &m, &n);
    if (m < n) {
        m = m + n;
        n = m - n;
        m = m - n;
    }
    while (n != 0) {
        m = m % n;
        m = m + n;
        n = m - n;
        m = m - n;
    }
    printf("Greatest common divisor: %d\n", m);
    return 0;
}